<!--
 * @Description: 动画
 * @Author: zzj
 * @Date: 2021-08-18 21:01:26
 * @LastEditors: zzj
 * @LastEditTime: 2021-08-18 21:27:37
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>动画</title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            background-color: aqua;
            border-radius: 50%;
        }
        .move{
            /* 2.设定动画 */
            animation-name: move;
            animation-duration: 2s;
            animation-timing-function: linear;
            /* animation-delay: 1s; */
            animation-fill-mode:forwards;
            animation-iteration-count: 4;
            animation-direction: alternate-reverse;    
            
        }
        .move:hover{
            animation-play-state: paused;
        }
        .move_delay_1{
            animation-delay: 1s;
        }
        /* 1.定义动画帧 */
        @keyframes move{
            form{
                margin-left: 0;
            }
            to{
                margin-left: 800px;
            }
        }
    </style>
</head>
<body>
    <div class="box move"></div>
    <!-- <div class="box move move_delay_1"></div> -->
</body>
</html>